package com.daify.threadlearn.chapter01.order03;


import java.util.Collection;
import java.util.SortedSet;
import java.util.TreeSet;

/**
 * @author daify
 * @date 2019-06-04
 */
public class TheArk {


    public int loadTheArk (Collection<String> collection) {

        SortedSet strings;
        int num = 0;
        String name = null;
        // strings 全程在方法内，不对外暴露。只存在于方法栈中
        strings = new TreeSet<String>();
        strings.add(collection);
        for (Object s : strings) {
            //...doSameThing
            num++;
        }
        return num;
    }
}
